package com.riguz.springcloud.repository;

import com.riguz.springcloud.model.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class PostRepository {
    @Autowired
    private MongoTemplate mongoTemplate;

    public Post findPostById(String id) {
        return mongoTemplate.findById(id, Post.class);
    }

    public List<Post> paginationList(String lastId, int pageSize) {
        return null;
    }
}
